#ifndef P0Wrap_H
#define P0Wrap_H

#include <qglobal.h>
#include <QHash>

#include <QMap>
#include <QDebug>

#include "..\xmlparser.h"
#include "P2PprotocolCPP.h"
#include "p0parameter.h"


using namespace P2PprotocolCPP;

class P0Wrap
{
public:
    static void start();
    static void stop();

    static void p0Create();
    static void p0Delete();

    static void onP0ReceiveData(P2PprotocolCPP::P2PChannel& channel,
                              unsigned char* data,
                              int length);

    static  void Send(int id, QByteArray byte);
    static  bool contain(int id);
    static  void cleanP0Data();

    static QHash<qint16,P0Paramer>  hashP0Parameter;
    static QHash<qint16,P2PprotocolCPP::P2PChannel*> hashP0Channel;
    static QHash<int, QByteArray> hashP0Data;


    static int count;

};

#endif // P0Wrap_H
